package org.ssp.servlet;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 发送邮件给用户/添加备注信息
 * 
 */
@WebServlet("/user")
public class UserHandleServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
    
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		String method=request.getParameter("method");
		if("mail".equals(method)){
			String[] emials=request.getParameterValues("mail");//checkbox的值
			request.setAttribute("tobody", "1255292979@qq.com");
			request.getRequestDispatcher("/email.jsp").forward(request, response);
		}else if("edit".equals(method)){
			String id=request.getParameter("id");
			
		}else if("remove".equals(method)){
			
			
		}else if("userinfo".equals(method)){
			//根据id查出user的信息并显示
			request.getRequestDispatcher("/52.jsp").forward(request, response);
			
		}
	}

	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doGet(request, response);
	}

}
